<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html">

    <h:body>
        <ui:composition template="template.xhtml">
            <ui:define name="content">
                <div id="content">
                    <h:form id="login">

                        <h:panelGrid columns="2" rendered="true">

                            <h:outputLabel for="username">Username:</h:outputLabel>

                            <h:inputText id="username" value="#{kalenderPM.username}" title="username"/>

                            <h:outputLabel for="password" >Password:</h:outputLabel>

                            <h:inputSecret id="password" value="#{kalenderPM.password}" title="password" />
                            
                        </h:panelGrid>

                        <h:commandButton value="Login" action="#{kalenderPM.login()}" rendered="#{!kalenderPM.loggedIn}"/>

                        <h:commandButton value="Logout" action="#{kalenderPM.logout()}" rendered="#{kalenderPM.loggedIn}"/>

                    </h:form>
                </div>
            </ui:define>
        </ui:composition>
    </h:body>
</html>
